<div class="nav">
    <a class="sel" href="{:U('GoodsComment/index')}">评论列表</a>
</div>
<div class="search">
    <form method="get" action="">
        关键词搜索：<input type="text" name="title" id="title" value="{$title}" class="input1" />&nbsp;&nbsp;&nbsp;
        <input type="submit" value="搜索" class="btn_search" />
        <input type="hidden" name="p" value="1" />
    </form>
</div>
<div class="list">
    <form method="post" id="frm_list" action="">
    <table class="table_list">
        <thead><tr>
                <td width="60px">选择</td>
                <td width="80px">评论星级</td>
             
                <td>评论内容</td>
                <td>商品名称</td>
                <td width="100px">评论人</td>
                <td width="150px">评论时间</td>
                 <td width="120px">审核状态</td>
                <td width="160px">操作</td>
            </tr>
        </thead>
        <tbody>
        <foreach name="list" item="item">
            <tr>
                <td><input type="checkbox" name="selid[]" value="{$item.id}" /></td>
                <td><span class="star_s{$item.star}"></span></td>
             
                <td>{$item.detail}</td>
                <td><a href="{:U('Home/Goods/index',array('id'=>$item['goods_id']))}" target="_blank">{$item.goods_name}</a></td>
                <td><a href="{:U('GoodsComment/index',array('member_id'=>$item['member_id']))}" title="查看此会员的评论">{$item.member_id|show_member_name}</a></td>
                <td>{$item.create_time|date='Y-m-d',###}</td>
                 <td>
                 <switch name="item.status">
                         <case value="2"><font color=green>审核通过</font></case>
                         <case value="1"><font color=red>未审核</font></case>
                    </switch>
                 </td>
                <td>
                <a class="btn_a3" onclick="confirm_comment_reply({$item.id},'回复评价')">查看与回复</a>
                
                <a class="btn_a2" href="{:U('del',array('id'=>$item['id']))}" onclick="return confirm('确定删除吗？')">删除</a></td>
           </tr>
        </foreach>
        </tbody>
        <tfoot>
            <tr><td colspan="10" style="text-align:left;">
                    <input name="checkall" id="checkall" type="checkbox" onclick="check_all(this.form)" value="1"><label for="checkall">全选</label>&nbsp;
                    <input type="button" class="btn_a2" onclick="del_sel()" value="删除所选" />
                </td></tr>
            <tr><td colspan="10">
                    <div class="page">{$page}</div>
                </td></tr>
        </tfoot>
    </table>
    </form>
</div>
<script type="text/javascript">
    //全选
    function check_all(form)
    {
        var elems = form.getElementsByTagName("input");
        for(var i=0;i<elems.length;i++)
        {
            if (elems[i].name == "selid[]")
            {
                elems[i].checked = form.checkall.checked;
            }
        }
    }
    //删除所选
    function del_sel() {
        if(confirm('确定删除所选吗？')) {
            $("#frm_list").attr('action','{:U('delsel')}');
            $("#frm_list").submit();
        }
    }
</script>

<script src="__PUBLIC__/common/artDialog4.1.7/artDialog.source.js?skin=blue" type="text/javascript"></script>
<script src="__PUBLIC__/common/artDialog4.1.7/plugins/iframeTools.source.js" type="text/javascript"></script>
<script type="text/javascript">
    //全选
var url_comment_reply ="{:U('GoodsComment/reply')}";
var current_url = "{$current_url}";
 function confirm_comment_reply(id,title) {
    art.dialog.open(url_comment_reply + "?id=" +id,{lock:true, title: title+"", width: "700px",follow: document.getElementById('btn3'),close : function () {
      art.dialog.open.origin.location.href="index";
   }});
}
</script>
 
